<h2>Mitarbeiter-Monats-Report</h2>
<b>Jahr: <?php echo "$this->year" ?></b>
<?php $months = array('Jan', 'Feb', 'M&auml;r', 'Apr', 'Mai', 'Jun', 
    'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez', 'Summe') ?>

<table border="1" width="100%" style="table-layout: fixed">
    <tr>
	<th></th>
	<?php for($i = 0; $i < 13; $i++): $monthText = $months[$i] ?>
	    <th align="center" valign="middle"><?php echo $monthText ?></th>
	<?php endfor; ?>
    </tr>
    <?php for($i = 0; $i < count($this->user); $i++): $employee = $this->user[$i]; $id = $employee['id']; $sum = 0; ?>
    <tr>
	<td nowrap><?php echo substr($employee['forename'], 0, 1) . ". " . $employee['surname'] ?></td>
	<?php for($u = 1; $u <= 12; $u++): $month = $u < 10 ? "0$u" : "$u"; $value = $this->data[$id]; $sum = $sum + $value[$month]; ?>
	    <td align="center" valign="middle"><?php echo round($value[$month], 2) ?></td>
	<?php endfor; ?>
	    <td align="center" valign="middle"><?php echo round($sum, 2) ?></td>
    </tr>
    <?php endfor; ?>
</table>